package com.szqhyxj.youxiangju.sys.components.view.popview;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.szqhyxj.youxiangju.R;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by leung on 2019/2/15.
 */

public class ErrorPopView extends BaseDialog {

    TextView errorinformation;
    private OnClickListener listener;
    private String titles;
    public ErrorPopView(Context context) {
        super(context);
    }

    public ErrorPopView(Context context, String title) {
        super(context);
        this.titles= title;
        errorinformation.setText(titles);


    }

    @Override
    protected View initDialogView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.popview_error, null);
        errorinformation = view.findViewById(R.id.error);
        TextView cancel = view.findViewById(R.id.cancel);
        cancel.setOnClickListener(this);
        return view;
    }

    @OnClick({R.id.cancel})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.cancel:
                dismiss();
                break;

        }
    }



    public interface OnClickListener {
        void onClickConfirm(View v);
    }

    public void setOnClickListener(OnClickListener listener) {
        this.listener = listener;
    }

}








